use actix_web::{get, HttpResponse, post, Responder};
use serde_json::json;

#[get("/")]
async fn hello() -> impl Responder {
    log::info!("123123");
    HttpResponse::Ok().json(json!({
       "data":"你好呀哈哈哈"
    }))
}

#[post("/echo")]
async fn echo(req_body: String) -> impl Responder {
    HttpResponse::Ok().body(req_body)
}

pub async fn manual_hello() -> impl Responder {
    HttpResponse::Ok().body("Hey there!")
}